package offertest.doubleLock;

import java.util.Scanner;

/**
 * @ClassName TestL
 * @Description
 * @Author ZJX
 * @Date 2025/4/9 20:41
 * @Version 1.0
 **/
public class TestL {

    private volatile static int count = 0;
    public static void main(String[] args) {
        Thread thread = new Thread(()->{
            while (count == 0){
                synchronized ()
            }
            System.out.println("t1");
        });

        Thread thread1 = new Thread(()->{
            Scanner scanner = new Scanner(System.in);
            count = scanner.nextInt();
        });

        thread.start();
        thread1.start();
    }
}
